//
//  CouponView.h
//  OrderSeat
//
//  Created by 王威 on 13-12-25.
//  Copyright (c) 2013年 wangwei. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "EGORefreshTableHeaderView.h"

typedef enum {
    NewCoupon,
    DoneCoupon
} CouponType;

@class CouponDataSource;
@class MyCouponViewController;
@interface CouponView : UIView<UIScrollViewDelegate,EGORefreshTableDelegate>

@property (assign, nonatomic) int couponType;
@property (assign, nonatomic) BOOL reloading;
@property (assign, nonatomic) BOOL moreLoading;
@property (strong, nonatomic) UITableView *couponTable;
@property (strong, nonatomic) EGORefreshTableHeaderView *refreshHeaderView;

@property (strong, nonatomic) MyCouponViewController *couponVC;
@property (strong, nonatomic) CouponDataSource *dataSource;

- (id)initWithFrame:(CGRect)frame andCouponType:(CouponType)couponType;

@end

@interface CouponDataSource : BaseDataSource<UITableViewDelegate,UITableViewDataSource>

@property (assign, nonatomic) int pageNumber;
@property (strong, nonatomic) NSMutableArray *couponList;
@property (strong, nonatomic) CouponView *view;

- (void)fetchCoupon;
- (void)removeWithId:(NSString *)couponId;

@end
